<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title></title>
    <script type="text/javascript">
        function ajaxFunction ()
        {
            try
            {
                xmlHttp = new XmlHttpRequest ();
            }
            catch(e)
            {
                try
                {
                    xmlHttp = new ActiveXObject ("Msxml12.XMLHTTP");
                }
                catch(e)
                {
                    try
                    {
                        xmlHttp = new ActiveXObject ("Microsoft.XMLHTTP");
                    }
                    catch(e)
                    {
                        alert ("Your Browser canNot Support AJAX!");
                        return false;
                    }

                }
            }
            xmlHttp.onreadystatechange=function()
            {
                if(xmlHttp.readyState==4)
                {
                   document.MyForm.time.value=xmlHttp.responseText;
                }
                xmlHttp.open("GET","time.asp",true);
                xmlHttp.send(null);
            }
        }
    </script>
<body>
  <form name="MyForm">
      Name:<Input onkeyup="ajaxFunction();" type="text" name="username">
      Time:<Input type="text" name="time">
  </form>
</body>
</html>